<?php
/* 
 *货前样质量管理
 */
class Sample_qcAction extends CommonAction {
    public function _filter(&$map) {
        $key = trim($_REQUEST['keywords']);
        if(!empty($key)) {
            $map['title'] = array('like',"%".$key."%");
            $map['name'] = array('like',"%".$key."%");
            $map['_logic'] = "or";
        }
        //和供应商签订合同后，就可以进行质量管理
        $map['status'] = array('egt',2);
    }

    public function index(){
        parent::index('BuyView');
    }

    public function edit(){
        $model = M ( 'Buy');
        $id = $_REQUEST [$model->getPk ()];
        $vo = $model->getById ( $id );
        $this->assign ( 'vo', $vo );
        $this->display ();
    }
}
?>
